/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc. 
 *  
 * SPDX-License-Identifier: Apache-2.0.
 * 
 * @Date: 2021-06-17 13:19:37
 * @LastEditTime: 2021-07-16 16:24:05
 * @Description:  This files is for 
 * 
 * @Modify History: 
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 */
#include "early_uart.h"

void OutByte(s8 byte)
{
    while ((FtIn32(0x2800d018) & 0x20) == 0x20)
    {
    }

    FtOut32(0x2800d000, (u32)byte);
}

char GetByte(void)
{
    while ((FtIn32(0x2800d018) & 0x10) == 0x10)
        ;

    return (char)FtIn32(0x2800d000);
}
